package com.kayeah82.application.avatar.qq.configuration;

import com.kayeah82.application.avatar.qq.component.Components;
import com.kayeah82.application.avatar.qq.controller.Controllers;
import com.kayeah82.application.avatar.qq.repository.Repositories;
import com.kayeah82.application.avatar.qq.service.Services;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author kayeah82
 * */
@Configuration
@PropertySource(value = {
        "classpath:presets.properties"
})
@Import(value = {
        ThymeleafConfig.class,
        RedisConfig.class
})
@ComponentScan(basePackageClasses = {
        Repositories.class,
        Components.class,
        Services.class,
        Controllers.class
})
@EnableAsync
class RootConfig {

    @Bean
    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
        return new PropertySourcesPlaceholderConfigurer();
    }

}
